package com.ywu.bpmn.form.standard.service;

import com.ywu.bpmn.form.service.dto.YwuFormInstanceConditionDto;
import com.ywu.bpmn.form.service.dto.YwuFormInstanceDto;
import com.ywu.bpmn.form.service.service.YwuFormInstanceService;
import com.ywu.common.result.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName YwuFormInstanceService
 * @Description TODO
 * @Author GroundDemo
 * @Date 2025/4/21 0:50
 * @Version 1.0
 **/
@Service
public class YwuFormInstanceStandardService {
    @Autowired
    private YwuFormInstanceService service;

    /**
    * @Author GroundDemo
    * @Description 创建表单实例
    * @Date 0:52 2025/4/21
    * @Param [dto]
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    public CommonResult<Object> createFromInstance(YwuFormInstanceDto dto) {
        return service.addFormInstance(dto);
    }

    /**
    * @Author GroundDemo
    * @Description 修改表单实例
    * @Date 0:53 2025/4/21
    * @Param [dto]
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    public CommonResult<Object> updateFromInstance(YwuFormInstanceDto dto) {
        return service.updateFormInstance(dto);
    }

    /**
    * @Author GroundDemo
    * @Description 删除表单实例
    * @Date 0:54 2025/4/21
    * @Param [dto]
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    public CommonResult<Object> deleteFromInstance(YwuFormInstanceDto dto) {
        return service.deleteFormInstance(dto);
    }

    /**
    * @Author GroundDemo
    * @Description 分页查询表单实例
    * @Date 0:54 2025/4/21
    * @Param [dto]
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    public CommonResult<Object> queryPageList(YwuFormInstanceDto dto) {
        return service.queryPageList(dto);
    }

    /**
    * @Author GroundDemo
    * @Description 查询表单实例条件
    * @Date 9:33 2025/4/21
    * @Param [dto]
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    public CommonResult<Object> queryInstanceCondition(YwuFormInstanceConditionDto dto) {
        return service.formInstanceConditionQuery(dto);
    }

    /**
    * @Author GroundDemo
    * @Description 创建表单实例搜索条件
    * @Date 9:33 2025/4/21
    * @Param [dto]
    * @return com.ywu.common.result.CommonResult<java.lang.Object>
    **/
    public CommonResult<Object> createInstanceCondition(YwuFormInstanceConditionDto dto) {
        return service.formInstanceConditionInsert(dto);
    }
}
